<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"></c:set>
<ul class="shop-paging clearfix">
    <c:if test="${currentPage>1}">
        <li><a href="${pathURL}?p=${currentPage-1}" class="pag-item">&lt;</a></li>
    </c:if>
    <c:if test="${currentPage==1}">
        <li><a href="${pathURL}?p=${currentPage}" class="pag-item">&lt;</a></li>
    </c:if>
    <c:forEach begin="${currentPage-3>0?currentPage-3:1}" end="${currentPage+3<=totalPage?currentPage+3:totalPage}" step="1" var="k">
        <li class="${currentPage==k?'pag-item pag-active':'pag-item'}"><a href="${pathURL}?p=${k}">${k}</a></li>
    </c:forEach>
    <c:if test="${currentPage < totalPage}">
        <li><a href="${pathURL}?p=${currentPage+1}" class="pag-item">&gt;</a></li>
    </c:if>
    <c:if test="${currentPage == totalPage}">
        <li><a href="${pathURL}?p=${currentPage}" class="pag-item">&gt;</a></li>
    </c:if>
    <%-- <li><a href="javascript:;" class="pag-item">&lt;</a></li>
     <li><a href="news.html" class="pag-item pag-active">1</a></li>
     <li><a href="javascript:;" class="pag-item">2</a></li>
     <li><a href="javascript:;" class="pag-item">3</a></li>
     <li><a href="javascript:;" class="pag-item">4</a></li>
     <li><a href="javascript:;" class="pag-item">&gt;</a></li>--%>
</ul>
